package com.example.onlinemarket.bean.mobile;

import com.example.onlinemarket.bean.Good;
import com.example.onlinemarket.bean.Order;

import java.util.ArrayList;
import java.util.List;

public class MobileOrderInfo {
    public List<MobileOrderItem> orderItemList;
    public Order order;

    public MobileOrderInfo(){
        orderItemList = new ArrayList<>();
    }

    public void addOrderItem(Good good, int goodNum){
        orderItemList.add(new MobileOrderItem(order.getOrderId(), good, goodNum));
    }

    public MobileOrderInfo(Order order){
        orderItemList = new ArrayList<>();
        this.order = order;
    }
}
